{/* LAYOUT模板 */}
	<layout name="layout"/>
{/* LAYOUT模板 */}
{/* import Js,Css */}
	<js href="__PUBLIC__/js/admin/listTable.js"/>
	<js href="__PUBLIC__/js/admin/js.util.js"/>
	<css href="__PUBLIC__/css/admin/common.css"/>
	<js href="__PUBLIC__/js/admin/js.selectzone.js"/>
	
	<css href="__PUBLIC__/css/jquery-ui.css" />
	<js href="__PUBLIC__/js/core/jquery-ui.1.10.4.js" />
	<js href="__PUBLIC__/js/core/plugins.js"/>
{/* import js,css */}
<!-- [position] -->
	<include file="Template:position"/>
<!-- [position] -->

<div class="form-div">
	<form action="javascript:searchGroupBuy()" name="searchForm">
		<img src="__PUBLIC__/image/admin/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
		商品名称 <input type="text" name="keyword" size="30" />
		<input type="submit" value="搜索" />
	</form>
</div>

<form method="post" action="group_buy.php?act=batch_drop" name="listForm" onsubmit="return confirm(batch_drop_confirm);">
	<div class="list-div" id="listDiv">
		<table cellpadding="3" cellspacing="1" width="100%">
			<tr>
				<th>
					<input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" />
					<a href="javascript:listTable.sort('act_id'); "> 编号</a>{$sort_act_id}
				</th>
				<th><a href="javascript:listTable.sort('goods_name'); ">商品名称</a>{$sort_goods_name}</th>
				<th><a>状态</a></th>
				<th><a href="javascript:listTable.sort('end_time'); ">结束时间</a>{$sort_end_time}</th>
				<th><a href="javascript:listTable.sort('deposit'); ">保证金</a>{$sort_deposit}</th>
				<th><a href="javascript:listTable.sort('restrict_amount'); ">限购</a>{$sort_restrict_amount}</th>
				<th>订购商品</a></th>
				<th>订单</a></th>
				<th>当前价格</a></th>
				<th>操作</th>
			</tr>
			<volist name="group_buy_list" id="group_buy">
			<tr>
				<td>
					<input value="{$group_buy.act_id}" name="checkboxes[]" type="checkbox">{$group_buy.act_id}
				</td>
				<td>{$group_buy.goods_name}</td>
				<td>{$group_buy.cur_status}</td>
				<td align="right">{$group_buy.end_time}</td>
				<td align="right">
					<span onclick="listTable.edit(this, 'edit_deposit', {$group_buy.act_id})">{$group_buy.deposit}</span>
				</td>
				<td align="right">
					<span onclick="listTable.edit(this, 'edit_restrict_amount', {$group_buy.act_id})">{$group_buy.restrict_amount}</span>
				</td>
				<td align="right">{$group_buy.valid_goods}</td>
				<td align="right">{$group_buy.valid_order}</td>
				<td align="right">{$group_buy.cur_price}</td>
				<td align="center">
					<a href="__APP__/order/order_list?group_buy_id={$group_buy.act_id}">
						<img src="__PUBLIC__/image/admin/icon_view.gif" title="查看订单" border="0" height="16" width="16" />
					</a>
					<a href="__URL__/mod_groupbuy?id={$group_buy.act_id}" title="编辑">
						<img src="__PUBLIC__/image/admin/icon_edit.gif" border="0" height="16" width="16" />
					</a>
					<a href="__URL__/remove_groupbuy?id={$group_buy.act_id}" onclick="listTable.remove({$group_buy.act_id},'{$lang.drop_confirm}')" title="移除">
						<img src="__PUBLIC__/image/admin/icon_drop.gif" border="0" height="16" width="16" />
					</a>
				</td>
			</tr>
			</volist>
		</table>
	</div>
</form>

<script type="text/javascript" language="JavaScript">
	onload = function(){
		document.forms['searchForm'].elements['keyword'].focus();
		//startCheckOrder();
	}

  /**
   * 搜索团购活动
   */
	function searchGroupBuy(){
		var keyword = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
		listTable.filter['keyword'] = keyword;
		listTable.filter['page'] = 1;
		listTable.loadList("group_buy_list");
	}
</script>





